$(function(){
$('.top-inner ul li:nth-child(1)').hover(function(){
    $('.top-inner ul li:nth-child(1) div').css('color','#1f9bd9')
},function(){
	$('.top-inner ul li:nth-child(1) div').css('color','#00b7d6')
});
$('.top-inner ul li:nth-child(2)').hover(function(){
    $('.top-inner ul li:nth-child(2) div').css('color','#1f9bd9')
},function(){
	$('.top-inner ul li:nth-child(2) div').css('color','#00b7d6')
});
$('.top-inner ul li:nth-child(1)').hover(function(){
	$('.top-inner-js .li1').css('display','block')
},function(){
	$('.top-inner-js .li1').css('display','none')
})
$('.top-inner ul li:nth-child(2)').hover(function(){
	$('.top-inner-js .li2').css('display','block')
},function(){
	$('.top-inner-js .li2').css('display','none')
})
//----------------------------------------------------------------------------------------------------------------
//导航js
$('.nav .clearfix li:nth-child(2)').hover(function(){
	$('.guanggaoinner').css('display','block');
},function(){
	$('.guanggaoinner').css('display','none')
})
$('.nav .clearfix li:nth-child(3)').hover(function(){
	$('.taobao').css('display','block')
},function(){
	$('.taobao').css('display','none')
})
// 轮播
$('.banner img').first().css('z-index','2');
$('.banner-inner li').first().addClass('check');
var currentIndex = 0
var totalNum = $('.banner img').length;
function autoScroll (){
	if (currentIndex>=totalNum) {
		currentIndex = 0
	}
	$('.banner img').eq(currentIndex).css('z-index','2').siblings().css('z-index','1');
	$('.banner-inner li').eq(currentIndex).addClass('check').siblings().removeClass('check');
	currentIndex++;
}
var timer = setInterval(autoScroll,1000);

$('.banner-inner li').hover(function(){
	clearInterval(timer);
	$('.banner img').eq($(this).index()).css('z-index','2').siblings().css('z-index','1');
	$('.banner-inner li').eq($(this).index()).addClass('check').siblings().removeClass('check');
},function(){
	currentIndex = $(this).index()+1;
	timer = setInterval(autoScroll,1000);
})























});